package com.ke.dao;

import com.ke.pojo.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author bochen
 */
@Mapper
public interface ArticleMapper {
    /**
     * 查询最新5篇文章
     * @return
     */
    List<Article> findArticleByTime(@Param("size") int size);

    /**
     * 模糊查询
     * @param word
     * @return
     */
    List<Article> findArticleByLike(@Param("word") String word);

    int addLikeNumber(@Param("id")Integer id);
}
